# -*- coding: utf-8 -*-
from sqlalchemy import Column, Integer, String

from utils.work_db import Base


class SysDict(Base):
    __tablename__ = 'sys_dict'
    dict_id = Column(Integer, primary_key=True, autoincrement=True)
    key = Column(String)
    value = Column(Integer)
    type = Column(String)
    remark = Column(String)

    def json(self):
        return {
            'dict_id': self.dict_id,
            'key': self.key,
            'value': self.value,
            'type': self.type,
            'remark': self.remark
        }
